package com.bawei.module_attendance.model

import com.bawei.library_net.RetrofitManager
import com.bawei.library_net.entity.BaseEntity
import com.bawei.module_attendance.entity.RequestEntity
import com.bw.attendance.sign.entity.SignEntity
import com.bw.attendance.sign.entity.SignResponseEntity

import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.map

class SignService {

    private val api:SignApi
    init {
        api = RetrofitManager.instance.create(SignApi::class.java)
    }
    //请求签到记录
    suspend fun requestSignHistory(requestEntity: RequestEntity): SignEntity {
        return api.requestSelSign(requestEntity)
    }
    //签到
    suspend fun requestSign(requestEntity: RequestEntity):SignResponseEntity{
        return api.requestInsertSign(requestEntity)
    }
}